package com.zhangzhan.gulimallseckill.feign.fallback;

import com.zhangzhan.gulimallcommcon.util.R;
import com.zhangzhan.gulimallseckill.feign.CouponFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2024/7/6 11:45
 */
@Component
@Slf4j
public class CouponFeignFallback implements CouponFeignService {
    @Override
    public R getSeckillData() {
        log.debug("远程服务调用失败。。。。。");
        return   R.error(HttpStatus.EXPECTATION_FAILED.value(), HttpStatus.EXPECTATION_FAILED.getReasonPhrase());
    }
}
